﻿@{
    var list = this.ViewData["selectList"] as SelectList;
    <div>
        @foreach (var item in list) {
               var radioId = ViewData.TemplateInfo.GetFullHtmlFieldId(item.Value);
               var checkedAttr = item.Selected ? "checked='checked'" : string.Empty;
            <input type="radio" id="@radioId" name="@ViewData.TemplateInfo.HtmlFieldPrefix" value="@item.Value" @checkedAttr/>
            <img src="../../../Content/images/@(item.Value).png" alt="@item.Text" class="enumimage"/>
            <label for="@radioId">@item.Text</label>
        }
    </div>    
}

